/**
 * 
 */
package com.eagle.coders.common.ui.interfaces;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Anees
 *
 */
public interface IComponent extends Serializable {

	String getComponentIdentity();
	
	String getFormTitle();
	
	String getI18Bundle();
	
	String getNavigationLabel();
	
	Map<String, Integer> getNavigationGroupLevel();
	
//	JPanel getPanel();
//	
//	void setPanel(JPanel panel);
	
	String getXml();
	
	void setXml(String xml);
	
	static class BaseComponent implements IComponent{

		private static final long serialVersionUID = 1L;

		private String identity;
		private String formTitle;
		private String navigationLabel;
		private String xml;
		
		/**
		 * 
		 */
		@Override
		public String getComponentIdentity() {
			return identity;
		}
		/**
		 * 
		 */
		@Override
		public String getFormTitle() {
			// TODO Auto-generated method stub
			return formTitle;
		}
		/**
		 * 
		 */
		@Override
		public String getXml() {
			// TODO Auto-generated method stub
			return xml;
		}
		/**
		 * 
		 */
		@Override
		public void setXml(String xml) {
			this.xml = xml;
		}
		/**
		 * @param identity the identity to set
		 */
		public void setIdentity(String identity) {
			this.identity = identity;
		}
		/**
		 * @param formTitle the formTitle to set
		 */
		public void setFormTitle(String formTitle) {
			this.formTitle = formTitle;
		}
		@Override
		public String getNavigationLabel() {
			return navigationLabel;
		}
		
		/**
		 * 
		 */
		@Override
		public Map<String, Integer> getNavigationGroupLevel() {
			return new HashMap<String, Integer>();
		}

		@Override
		public String getI18Bundle() {
			return "";
		}
	}
}
